/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/


#pragma once



#include "几何数据.h"
//#include <向量.h>
//#define __CUDACC__

CUDA_CALLABLE inline vec3 operator+(const vec3& a, const vec3& b) {
	return { a.x + b.x, a.y + b.x, a.z + b.z };
};


CUDA_CALLABLE inline vec3 operator-(const vec3& a, const vec3& b) {
	return { a.x - b.x, a.y - b.y, a.z - b.z };
};
CUDA_CALLABLE inline vec3 operator-(const vec3& a, const float32 b) {
	return { a.x - b, a.y - b, a.z - b };
};



CUDA_CALLABLE inline vec3 operator*(const vec3& a, const float32 b) {
	return { a.x * b, a.y * b, a.z * b };
};
CUDA_CALLABLE inline vec3 operator*(const vec3& a, const vec3& b) {
	return { a.x * b.x, a.y * b.y, a.z * b.z };
};


CUDA_CALLABLE inline uvec3 operator+(const uvec3& a, const uint32 b) {
	return { a.x + b, a.y + b, a.z + b };
};

CUDA_CALLABLE inline vec2 operator/(const vec2& a, const uvec2 b) {
	return { a.x / b.x, a.y / b.y };
};
















